import React from 'react';
import Layout from '../src/component/layout/index.jsx';
import Home from '../src/page/home/index.jsx';
import Detail from '../src/page/detail/index.jsx';
import Mine from '../src/page/mine/index.jsx';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';

function App() {
  return (
    <Router>
      <Layout>
        <Switch>
          <Route exact path="/" component={Home}/>
          <Route exact path="/mine" component={Mine}/>
          <Route exact path="/home/:keyword" component={Home}/>       
          <Route  path="/detail" component={Detail}/>
          <Route  path="/detail/:pid" component={Detail}/>
        </Switch>
      </Layout>
     </Router>
  );
}

export default App;
